package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
	
	/**
	 * 测试接口的临时方法
	 *
	 * @param id
	 * @return
	 */
	@Select("select * from sky_take_out.setmeal_dish where dish_id = #{id}")
	List<SetmealDish> getCountByDishId(Long id);
	
	void insert(SetmealDish setmealDish);
	
	void deleteBySetmealId(List<Long> setmealId);
	
	@Select("select dish_id from sky_take_out.setmeal_dish where setmeal_id = #{setmealId}")
	List<Long> getDishIdBySetmealId(Long setmealId);
	
	@Select("select * from sky_take_out.setmeal_dish where setmeal_id = #{setmealId}")
	List<SetmealDish> getBySetmealId(Long setmealId);
}
